#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Desc: 类装饰器


class Count:
    def __init__(self, func):
        self.func = func
        self.num_calls = 0

    def __call__(self, *args, **kw):
        self.num_calls += 1
        print('num of calls is: {}'.format(self.num_calls))
        return self.func(*args, **kw)

@Count
def example(msg):
    print(msg)

example('sssssss')
example('aaaaaa')
